package com.example.springbootdemo.demos.web.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/hello/a")
//下面注解表示可以被浏览器识别
@RestController
public class HelloController {
    @RequestMapping(value = "/sayHi/b",method = RequestMethod.GET)//sayHi对应一个访问路径
    public String sayHi(){
        return "hi SpringBoot";
    }

    @RequestMapping("/sayHello")//sayHi对应一个访问路径
    public String sayHello(){
        return "hello SpringBoot";
    }
}
